Bug #433324. add/remove selectable state depand on if the button can be
authorLi Yuan <li.yuan@sun.com>
Mon, 31 Mar 2008 07:48:16 +0000 (07:48 +0000)
committerLi Yuan <liyuan@src.gnome.org>
Mon, 31 Mar 2008 07:48:16 +0000 (07:48 +0000)
2008-03-31  Li Yuan  <li.yuan@sun.com>

        * gailbutton.c: (gail_button_ref_state_set):
        Bug #433324. add/remove selectable state depand on if the button can
        be focused.

svn path=/trunk/; revision=19950

modules/other/gail/ChangeLog
modules/other/gail/gailbutton.c

index 798a67d2dbab7c1bf1494d02e5ecf0f77c169f87..8f3dcd529f7e40511804aedca2782ada9eda722c 100644 (file)
@@ -1,3 +1,9 @@
+2008-03-31  Li Yuan  <li.yuan@sun.com>
+
+       * gailbutton.c: (gail_button_ref_state_set):
+       Bug #433324. add/remove selectable state depand on if the button can
+       be focused.
+
 2008-03-20  Li Yuan  <li.yuan@sun.com>
 
        * gailcell.c: (gail_cell_object_finalize):
index c2b8e8c700b159df6fab306c1594ebcf8f2ff1c0..64232f5e930bb69035a78afacb2f088e446887bf 100644 (file)
@@ -861,6 +861,12 @@ gail_button_ref_state_set (AtkObject *obj)
   if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE)
     atk_state_set_add_state (state_set, ATK_STATE_ARMED);
 
+  if (GTK_WIDGET_CAN_FOCUS(widget))
+    atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
+  else
+    atk_state_set_remove_state (state_set, ATK_STATE_SELECTABLE);
+
+
   return state_set;
 }